/*global axton */

if (typeof axton === "undefined") {
    axton = { };
}

axton.instrumentation = { 

    functions : [ ],

    traceMessages : {
        functionStart : true,
        functionReturn : true,
    },
    
    trace : function (funcId, traceMessage) { 
        var t0;
        var t1 = new Date().getTime();
        
        switch (traceMessage) {
        
            case "functionStart" :
                functions[fundId].starts.push(t);
                break;
            case "functionStop" :
                t0 = functions[funcId].starts.pop();
                function[funcId].times.push(t0-t1);
                break;
        
        }
        
    }, 
    
    report : function () {
    
    }

};